package com.test.springmvc;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/model")
public class Model {

    @RequestMapping(value = "/test1")
    public ModelAndView test1(ModelAndView modelAndView){
        modelAndView.addObject("username","admin");
        modelAndView.addObject("email","yyy@qq.com");

        modelAndView.setViewName("login");
        return modelAndView;
    }
}
